import './assets/main.css'

import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import './assets/common.scss'
import vue3TreeOrg from 'vue3-tree-org';
import "vue3-tree-org/lib/vue3-tree-org.css";
import registerGlobalComponents from './components/globalComponents.js';

import App from './App.vue'
// 路由
import router from './router'

const app = createApp(App)
registerGlobalComponents(app)

// 挂载一个全局格式化金额方法
app.config.globalProperties.formatPrice=(e)=>{
  if(e) return Number(e).toFixed(2)
  return 0
}

app.use(router)
app.use(ElementPlus)
app.use(vue3TreeOrg)
app.mount('#app')
